import router from "@/router";
import Vue from "vue"
import store from "@/store";
function checkLogin() {
    console.log('token值', store.state.user.token);
    if (store.state.user.token == undefined) {
        console.log('未登录')
        Vue.prototype.$alert('登录信息已过期，请前往登录', '登录过期提示', {
            confirmButtonText: '确定',
            callback: action => {
                router.push({ path: '/login' })
            }
        })
    }
}

export default {
    checkLogin
}